import React from 'react';
import classes from './index.module.css';

interface FormItemInf {
  children: React.ReactElement;
  label?: string;
}

export default function FormItem({ children, label }: FormItemInf) {
  return (
    <div className={classes.FormItem}>
      {!!label && <span className={classes.FormLabel}>{label}</span>}
      {children}
    </div>
  );
}
